<template>
  {{this.roleName}}
</template>

<script>
import {getRoleById} from "@/api/role";

export default {
  name: "RoleNameById",
  data() {
    return {
      roleName:''
    }
  },
  mounted() {
    getRoleById(this.roleId)
  },
  methods:{
    async getRoleById(id) {
      const a = await getRoleById(id)
      console.log(a)
      this.roleName = a['roleName'];
    }
  },
  props:['roleId']
}
</script>

<style scoped>

</style>